<template>
<div class="low">
    <div class="low_1">
        个人信息
    </div>
    <!-- 分割线利用背景色 -->
    <div class="low__"></div> 
    <div class="low_2">
        <div class="low_2_1">
          <div class="low_lab">上传头像：</div>
            <el-upload
                class="avatar-uploader"
                action="https://jsonplaceholder.typicode.com/posts/"
                :show-file-list="false"
                :on-success="handleAvatarSuccess"
                :before-upload="beforeAvatarUpload">
                <img v-if="imageUrl" :src="imageUrl" class="avatar">
                <i v-else class="el-icon-plus avatar-uploader-icon"></i>
                <div class="low_2_1_2">上传</div>
            </el-upload>
            <div class="low_img">
              <div class="low_imgs"></div>
              

            </div>
        </div>
        <div class="low_2_2">建议上传图片尺寸为60px*60px，若不设置则使用系统默认头像</div>
          <div style="margin:30px;"></div>
            <el-form :label-position="labelPosition" label-width="150px" :model="formLabelAlign">
              <el-form-item style="margin-bottom:14px" label="*邮箱地址">
                <el-input v-model="formLabelAlign.mail"></el-input>
              </el-form-item>
              <el-form-item style="margin-bottom:14px" label="*客服昵称">
                <el-input v-model="formLabelAlign.sname"></el-input>
              </el-form-item>
              <el-form-item style="margin-bottom:14px" label="*真实姓名">
                <el-input v-model="formLabelAlign.name"></el-input>
              </el-form-item>
              <el-form-item style="margin-bottom:14px" label="客服工号">
                <el-input v-model="formLabelAlign.num" placeholder="请输入"></el-input>
              </el-form-item>
              <el-form-item style="margin-bottom:14px" label="客服手机号码">
                <el-input v-model="formLabelAlign.nums" placeholder="请输入"></el-input>
              </el-form-item>
            </el-form>
        <!-- 分割线利用背景色 -->
       <div class="low__1"></div>
      </div> 
      <div class="low_3">
          <div class="low_3_1">密码设置</div>
            <div style="margin:20px;"></div>
            <el-form :label-position="labelPosition" label-width="150px" :model="formLabelAlign">
              <el-form-item style="margin-bottom:14px" label="原密码">
                <el-input v-model="formLabelAlign.pass" placeholder="请输入原密码"></el-input>
              </el-form-item>
              <el-form-item style="margin-bottom:14px" label="新密码">
                <el-input v-model="formLabelAlign.new_pass" placeholder="请输入新密码"></el-input>
              </el-form-item>
              <el-form-item style="margin-bottom:14px" label="确认新密码">
                <el-input v-model="formLabelAlign.snew_pass" placeholder="请再次输入密码"></el-input>
              </el-form-item>
              
            </el-form>
          <div class="low__2"></div>
        </div>
        <!-- 分割线利用背景色 -->
    
    <div class="low_4">
      <el-button :plain="true" @click="open2"  >保存</el-button>
    </div>

</div>
</template>

<script>
  export default {
    data: function() {
      return {
        imageUrl: '',
        labelPosition: 'left',
        formLabelAlign: {
          mail:'11938898@163.com',
          sname:'客服小美',
          name: '杜宇',
          num: '',
          nums: '',
          pass:'',
          new_pass:'',
          snew_pass:'',
        }
      };

    },
    methods: {
      handleAvatarSuccess(res, file) {
        this.imageUrl = URL.createObjectURL(file.raw);
      },
      beforeAvatarUpload(file) {
        const isJPG = file.type === 'image/jpeg';
        const isLt2M = file.size / 1024 / 1024 < 2;

        if (!isJPG) {
          this.$message.error('上传头像图片只能是 JPG 格式!');
        }
        if (!isLt2M) {
          this.$message.error('上传头像图片大小不能超过 2MB!');
        }
        return isJPG && isLt2M;
      },
      open2() {
        this.$message({
          message: '保存成功',
          type: 'success'
        });
      },
  
    },
     
  }
</script>

<style>
/* 上传头像 */
.avatar-uploader .el-upload {
    border: 1px dashed #d9d9d9;
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
  }
  .avatar-uploader .el-upload:hover {
    border-color: #409EFF;
  }
  .low_2{
    position: relative;
    left: 65px;
  }
  .low_2_1{
    width: 100%;
    height: 104px;
    display:flex;
    color: rgba(153, 153, 153, 0.847);
    font-size: 14px;
  }
  .low_lab{
    /* position: absolute; */
    /* text: 160px; */
    width: 150px;
    height: 40px;
  } 
  .low_img{
    width: 104px;
    height: 104px;
    border:dotted ;
    border-radius: 4px;
    
  }
  .low_imgs{ 
    width: 26px;
    height: 26px;
    background-image: url("./u327.png"); 
    background-size: cover;
    /* background-blend-mode: lighten; */
    background-color: #0000ff;
    border-radius: 50%;
    background-position: center;
    background-repeat: no-repeat;

  }
 
  .avatar-uploader{
    
    background-color:#f2f2f2;
    /* border-style: dashed; */
 
  }
   
  .avatar-uploader-icon {
    
    font-size: 24px;
    color: #8c939d;
    width: 104px;
    height: 84px;
    position: relative;
    top: 30px;
    text-align: center;
    
    /* line-height: 150px; */

  }
  .low_2_1_2{
    font-size: 14px;
    position: relative;
    top: -10px;
  }
  .low_2_2{
    color: rgba(153, 153, 153, 0.847);
    font-size: 12px;
    position: relative;
    left: 150px;
    top: 14px;

  }
  .avatar {
    width: 178px;
    height: 178px;
    display: block;
  }
  .low{
    
    width: 1040px;
    height: 849px;
    border-width: 0px;
    background-color: rgba(255, 255, 255, 1);
    border-radius: 4px;
  }
  .low_1{
    width: 100%;
    height: 60px;
    position: relative;
    top: 15px;
    left: 20px;
    font-size: 18px;
    font-family:ArialMT, Arial, sans-serif;
    font-style:normal;
    font-weight:400;
  }
  .low__{
    position: relative;
    left: 20px;
    width: 1020px;
    height: 1px;
    background-color:rgba(153, 153, 153,0.5);
    margin-bottom: 15px;
  }
  .el-form.el-form--label-left{
    width: 800px;
    margin: 0;
    padding: 0;
    
  }
  .el-form-item{
    width: 500px;
    height: 48px;
    
    
    }
  .el-form-item label{
    color: rgba(153, 153, 153, 0.847);
    font-size: 14px;

  }
  
 input[type=text]{
   width: 330px;
   height: 40px;
   background-color: rgba(242, 242, 242,0.5);
   /* display: none; */
   border: none;
 }
 input[type=text]:focus{
   background-color: white;
   border-style: solid;
   border-color: blue;
   border-width: 1px;
   
 }
 
 
 .el-input{
    font-family: 'Helvetica', sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: 12px;
    color: #000000;
    
  }
  .low__1{
    width: 962px;
    height: 1px;
    background-color:rgba(153, 153, 153,0.5);
    margin-bottom: 15px;
  }
  
  .low_3{
    position: relative;
    left: 65px;
  }
  .low_3_1{
    width: 56px;
    height: 19.2px;
    font-size: 14px;
  }
  .low__2{
    width: 962px;
    height: 1px;
    background-color:rgba(153, 153, 153,0.5);
    margin-bottom: 15px;

  }
  .low_4{
    position: relative;
    left: 65px;
  }
  
  
  .low_4  /deep/ .el-button{
    width: 80px;
    height: 32px;
    color: white;
    background-color:#4d79ff;
    border: none;
    font-size: 16px;
    line-height: 0;
  }
  .el-button:hover{
    color: white;
    background-color:#4d79ff;
    border: none;
    font-size: 16px;
    line-height: 0;
    

  }
  
 
 
 
 

</style>